import axiosRequest from "@/api/axiosRequest.ts";

const BaseUrl = '/files'

/* 上传文件 */
const uploadFile = (data: FormData) => axiosRequest({
    url: BaseUrl + '/upload',
    method: 'POST',
    data: data
})

/* 上传图片 */
const uploadImage = (data: FormData) => axiosRequest({
    url: BaseUrl + '/uploadImage',
    method: 'POST',
    data: data
})

export const fileApi = {
    uploadFile,
    uploadImage
}
